﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UFIDA.U9.CBO.SCM.Bin;
using UFSoft.UBF.Business;
using UFIDA.U9.Base.DTOs;

namespace UFIDA.U9.Cust.YYD.WebApi.Dtos.ReturnDtos
{

    /// <summary>
    /// 根据ASN创建收货单DTO
    /// </summary>

    public class CreateRcvByASNDTO
    {
        /// <summary>
        /// ASN转收货DTO
        /// </summary>

        public List<ASNToRcvTransDTO> aSNToRcvTransDTOs { get; set; }
        public string WMSDocNo { get; set; }
        public int DocStatus { get; set; }
        /// <summary>
        /// 分单条件
        /// </summary>

        public List<string> splitItems { get; set; }

        /// <summary>
        /// 第三方数据唯一性标识，此字段需要返回
        /// </summary>

        public string OtherID { get; set; }
    }

    /// <summary>
    /// ASN转收货DTO
    /// </summary>
    public class ASNToRcvTransDTO
    {
        /// <summary>
        /// 双数量 
        /// </summary>
        public DoubleQuantityDataDTO TransQty { get; set; }

        /// <summary>
        /// ASN行 (该属性不可为空,且无默认值)
        /// </summary>
        public long ASNLineKey { get; set; }

        /// <summary>
        /// 存储地点
        /// </summary>
        public IDCodeNameDTOData Wh { get; set; }

        /// <summary>
        /// 库位子表
        /// </summary>
        public List<UFIDA.U9.ISV.PM.RestSV.Model.SCM.PM.BinInfo> BinInfoList { get; set; }

        /// <summary>
        /// 项目
        /// </summary>
        public IDCodeNameDTOData Project { get; set; }

        /// <summary>
        /// 番号
        /// </summary>
        public IDCodeNameDTOData Seiban { get; set; }

        /// <summary>
        /// 库存批号
        /// </summary>
        public string InvLotCode { get; set; }

        /// <summary>
        /// 批号生效日期
        /// </summary>
        public string InvLotEnableDate { get; set; }

        /// <summary>
        /// 批号失效日期
        /// </summary>
        public string InvDisabledTime { get; set; }

        /// <summary>
        /// 有效期天数
        /// </summary>
        public int InvLotValidDate { get; set; }

        /// <summary>
        /// 收货程序 	
        /// 0 -收入；4 -收入检；1-收点入；5-收点入检；3-收点检入；2-收检入；6-收检点入；
        /// </summary>
        public int RcvProcedure { get; set; }
    }

    /// <summary>
    /// 双数量DTO
    /// </summary>
    public class DoubleQuantityDataDTO
    {
        /// <summary>
        /// 本次收货数量1
        /// </summary>
        public decimal m_amount1 { get; set; }

        /// <summary>
        /// 本次收货数量2
        /// </summary>
        public decimal m_amount2 { get; set; }

        /// <summary>
        /// 数量1单位信息
        /// </summary>
        public UOMInfoDTODataDTO m_uOM1 { get; set; }

        /// <summary>
        /// 数量2单位信息
        /// </summary>
        public UOMInfoDTODataDTO m_uOM2 { get; set; }
    }

    /// <summary>
    /// 单位信息DTO
    /// </summary>
    public class UOMInfoDTODataDTO
    {
        /// <summary>
        /// 主单位 实体key
        /// </summary>
        public BusinessEntity.EntityKey UOMMain_SKey { get; set; }

        /// <summary>
        /// 主单位 
        /// </summary>
        public long UOMMain { get; set; }

        /// <summary>
        /// 副单位 实体key
        /// </summary>
        public BusinessEntity.EntityKey UOMSub_SKey { get; set; }

        /// <summary>
        /// 副单位 
        /// </summary>
        public long UOMSub { get; set; }

        /// <summary>
        /// 转换率
        /// </summary>
        public decimal m_rate { get; set; }
    }

    public class ResultDTORData
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool IsSucess { get; set; }

        /// <summary>
        /// 接口版本标识
        /// </summary>
        public string U9CVersion { get; set; }

        /// <summary>
        /// 第三方传入数据标识
        /// </summary>
        public string OtherID { get; set; }

        /// <summary>
        /// 创建成功的档案ID或者单据ID
        /// </summary>
        public long ID { get; set; }

        /// <summary>
        /// 创建成功的档案Code或者单据的单号
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// IsSucess返回False时，ErrorMsg会返回具体的错误信息
        /// </summary>
        public string ErrorMsg { get; set; }
    }

   
}
